package com.dz.lm.service.usercollection;

import com.dz.lm.common.dto.PageDto;
import com.dz.lm.common.exception.ServiceException;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**人员收藏服务层
 * @version 1.8;
 * @author: LDY;
 * @Description;
 * @Date: Created in 2020/3/7 20:36;
 */
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)

public interface UserCollectionService {
    /**
     *
     * @param userId
     * @param type 1产品
     * @param status 1-收藏2隐藏3-举报
     * @param objId 对象id
     * @param remark 备注
     * @return
     * @throws Exception
     */
    int add(int userId,int type,int status,int objId,String remark)throws ServiceException;

    /**
     *
     * @param collectId 主键
     * @param userId 用户
     * @param  objId 对象id
     * @param status 1-收藏2隐藏3-举报
     * @param type 1产品
     * @return
     * @throws ServiceException
     */
    int deltet(int collectId,int userId,int objId,int status,int type) throws ServiceException;

    /**
     * 查询
     * @param pagetNum
     * @param rows
     * @param userId 用户
     * @param objId 1--产品id 2--用户id
     * @param type 1产品 2用户
     * @param status 1-收藏2隐藏3-举报
     * @return
     * @throws ServiceException
     */
    PageDto query(int pagetNum,int rows,int userId,int objId,int type, int status ) throws ServiceException;


}
